package com.iwuyc.tools.commons.util.collection;

import java.util.LinkedList;

/**
 * Non Thread-Safe.复合map。
 *
 * @param <K> key
 * @param <V> value
 * @author Neil
 */
public class MultiLinkedListHashMap<K, V> extends MultiHashMap<K, V, LinkedList<V>> {

    private static final long serialVersionUID = 889155975950159878L;

    public void addFirst(K key, V val) {
        LinkedList<V> valContainer = getCollection(key);
        valContainer.addFirst(val);
    }

    @Override
    protected LinkedList<V> createCollection(K key) {
        return new LinkedList<>();
    }
}
